About 2612 letters
About 13 minutes
<track>
The <track> HTML element is used as a child of the media elements, <audio> and <video>. Each track element lets you specify a timed text track (or time-based data) that can be displayed in parallel with the media element, for example to overlay subtitles or closed captions on top of a video or alongside audio tracks.
default
: This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one track
element per media element.
kind
: How the text track is meant to be used. If omitted the default kind is subtitles
. If the attribute contains an invalid value, it will use metadata
.
The following keywords are allowed:
subtitles
captions
chapters
metadata
label
: A user-readable title of the text track which is used by the browser when listing available text tracks.
src
: Address of the track (.vtt
file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the <audio>
or <video>
parent element of the track
element has a crossorigin
attribute.
srclang
: Language of the track text data. It must be a valid BCP 47 language tag. If the kind
attribute is set to subtitles
, then srclang
must be defined.
Created in 5/27/2025
Updated in 5/27/2025